package com.apesay.utils;

import com.alibaba.fastjson.serializer.SerializerFeature;

public class Constant {
	
	public static final String AUTHKEY = "apesay.20151130";
	
	/**
	 * 客户端输出
	 */
	public static final String CLIENT_RESPONSE = "app_client_response";	

	/** 用户表 **/
	public static final String model_user = "users";
	/** 系统操作日志 **/
	public static final String model_syslog = "sysLog";
	/** 字典表**/
	public static final String model_dictionary = "dictionary";
	/** 菜单管理 **/
	public static final String model_backend_menu = "backendMenu";
	/** 角色 **/
	public static final String model_backend_role = "backendRole";
	/** 分权内容 **/
	public static final String model_backend_permission = "backendPermission";
	/** 权限 **/
	public static final String model_backend_account = "backendAccount";
	/** 权限角色关系 **/
	public static final String model_backend_accountrole = "backendAccountRole";
	/**  模型inc**/
	public static final String model_modelInc = "modelInc";
	/**  标签**/
	public static final String model_sign = "modelSign";
	

	/** 项目 **/
	public static final String model_project = "project";
	/** 任务 **/
	public static final String model_task = "task";
	/******************************特殊模型****************************************/
	/******************************特定动作处理********************************************/
	public static final SerializerFeature[] serializerFeatures = { 
		SerializerFeature.WriteMapNullValue, // 输出空置字段
        SerializerFeature.WriteNullListAsEmpty,//list字段如果为null，输出为[]，而不是null
        SerializerFeature.WriteNullNumberAsZero,// 数值字段如果为null，输出为0，而不是null
        SerializerFeature.WriteNullBooleanAsFalse,//Boolean字段如果为null，输出为false，而不是null
        SerializerFeature.WriteNullStringAsEmpty,// 字符类型字段如果为null，输出为""，而不是null
	};
	
	
	/******************************所有模型都有字段****************************************/
	/**自增列*/
	public static final String IncID = "IncID";
	/**创建时间*/
	public static final String CREATED_AT = "createdAt";
	/**更新时间*/
	public static final String UPDATED_AT = "updatedAt";
	/**主键key*/
	public static final String OBJECTID = "objectId";
	/**数量*/
	public static final String COUNT = "count";
	/**随机字段*/
	public static final String RANDOM = "random";
	/**高级检索接口中的数据*/
	public static final String RESULTS="results";
	/**高级检索接口中的数据*/
	public static final String RESULT="result";
	/**状态标识：0：正常；1：删除*/
	public static final String DELSTATUS = "s";

	public final static String CHARSET = "UTF-8";
	/**系统用户*/
	public final static String SYSTEM = "system";
	/**按时间倒序*/
	public static final String ORDERBY_CREATED = "{"+Constant.CREATED_AT+":-1}";
	/**按时间倒序*/
	public static final String ORDERBY_UPDATED = "{"+Constant.UPDATED_AT+":-1}";
	/**按随机倒序*/
	public static final String ORDERBY_RANDOM_SMALL = "{"+Constant.RANDOM+":-1}";
	public static final String ORDERBY_RANDOM = "{"+Constant.RANDOM+":1}";
	
	public static final String API_CALL_STATUS_SUCCESS = "10000";
	public static final String API_CALL_STATUS_SUCCESS_MSG = "调用成功";

}
